<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
                   
class Hessian extends CI_Controller {

	function __construct() {
		parent::__construct();		$this->load->library('Maitaidata');
	}	 
           
	public function index(){	
	}

	public function getgadgetlist(){

		$arr =  get_object_vars($this->maitaidata->getGadgetList("","",10,10000)) ;
		var_dump($arr);
	}
 	
	public function getpromotypelist(){
		$arr = json_encode(get_object_vars($this->maitaidata->getPromoTypeList(""))) ;
		die($arr);
	}
 
	public function getstorelist(){
		$arr =  get_object_vars($this->maitaidata->getStoreList("","","")) ;
		var_dump($arr);
	}
	public function getpromovaliditylist(){
		$arr =  json_encode(get_object_vars($this->maitaidata->getPromoValidityList("8"))) ;
		die($arr);
	}
	public function getpromolist(){ // not working params
		$arr =  get_object_vars($this->maitaidata->getPromoList("9","UNLI CALLS",64)) ;
		var_dump($arr);
	}
	public function getcommitmentperiod(){
		$arr =  get_object_vars($this->maitaidata->getCommitmentPeriod("15")) ;
		var_dump($arr);
	}
	public function checkmsisdn($num){
		// not working
		$arr =  get_object_vars($this->maitaidata->checkMsisdn($num)) ;
		var_dump($arr);
	}
	public function registersubscriber(){
		// param should be object 
		$arr =  get_object_vars($this->maitaidata->registerSubscriber(null)) ;
		var_dump($arr);
	}

	public function getsubscriptiondetails($promocode){
		$arr =  get_object_vars($this->maitaidata->getsubscriptiondetails($promocode)) ;
		var_dump($arr);
	}

}
